Background model for complex and dynamic scenes

ABSTRACT

Techniques are disclosed for learning and modeling a background for a complex and/or dynamic scene over a period of observations without supervision. A background/foreground component of a computer vision engine may be configured to model a scene using an array of ART networks. The ART networks learn the regularity and periodicity of the scene by observing the scene over a period of time. Thus, the ART networks allow the computer vision engine to model complex and dynamic scene backgrounds in video.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of co-pending U.S. patent applicationSer. No. 12/543,336, filed Aug. 18, 2009, The aforementioned relatedpatent applications is herein incorporated by reference in its entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

Embodiments of the invention provide techniques for computationallyanalyzing a sequence of video frames. More specifically, embodiments ofthe invention relate to techniques for generating background modelrepresenting a scene depicted in the sequence of video frames.

2. Description of the Related Art

Some currently available video surveillance systems provide simpleobject recognition capabilities. For example, a video surveillancesystem may be configured to classify a group of pixels (referred to as a“blob”) in a given frame as being a particular object (e.g., a person orvehicle). Once identified, a “blob” may be tracked from frame-to-framein order to follow the “blob” moving through the scene over time, e.g.,a person walking across the field of vision of a video surveillancecamera.

Prior to analyzing scene foreground, a background model (or image) ofthe scene may need to be identified. The background model generallyrepresents the static elements of a scene captured by a video camera.For example, consider a video camera trained on a stretch of highway. Insuch a case, the background would include the roadway surface, themedians, any guard rails or other safety devices, and traffic controldevices, etc., visible to the camera. The background model may includean expected pixel color value for each pixel of the scene when thebackground is visible to the camera. Thus, the background model providesan image of the scene in which no activity is occurring (e.g., an emptyroadway). Conversely, vehicles traveling on the roadway (and any otherperson or thing engaging in some activity) occlude the background whenvisible to the camera and represent scene foreground objects.

However, some scenes present dynamic or otherwise complex backgroundsmaking it difficult to distinguish between scene background andforeground. Examples of complex backgrounds include ones where the videois noisy, the video contains compression artifacts, or the video iscaptured during periods of low or high illumination. In such cases, itbecomes difficult to classify any given pixel from frame-to-frame asdepicting background or foreground, (e.g., due to pixel colorfluctuations that occur due to camera noise). A scene background isdynamic when certain elements of the background are not stationary orhave multiple, visually distinguishable, states. Consider a scene with acamera trained on a bank of elevators. In such a case, the pixelsdepicting a closed elevator door would represent one background state,while a back wall of an elevator carriage visible when the elevatordoors were open would be another state. Another example includes atraffic light changing from green to yellow to red. The changes in statecan result in portions of the traffic light being incorrectly classifiedas depicting a foreground object. Other examples of a dynamic backgroundinclude periodic motion such as a scene trained on a waterfall or oceanwaves. While these changes in the scene are visually apparent as changesin pixel color from frame-to-frame, they should not result in elementsof the background such as pixels depicting an elevator carriage or thepixels depicting light bulbs within a traffic light being classified asforeground.

SUMMARY OF THE INVENTION

Embodiments of the invention relate to techniques for modeling thebackground of a scene captured by a video camera or other recordedvideo. One embodiment includes a computer-implemented method forgenerating a background model of a scene depicted in a sequence of videoframes captured by a video camera. The method itself may generallyinclude receiving a video frame. The video frame includes one or moreappearance values (e.g., RGB color values) for each of a plurality ofpixels. The method may also include, for one or more of the pixels,passing the appearance values for the pixel to an input layer of anadaptive resonance theory (ART) network corresponding to the pixel,mapping, by the ART network, the appearance values to one of one or moreclusters of the ART network, and classifying the pixel as depicting oneof scene background and scene foreground, based on the mapping of theappearance values to the cluster of the ART network.

Another embodiment of the invention includes a computer-readable storagemedium containing a program, which when executed on a processor,performs an operation for generating a background model of a scenedepicted in a sequence of video frames captured by a video camera. Theoperation itself may generally include receiving a video frame. Thevideo frame includes one or more appearance values for each of aplurality of pixels; The operation may also include, for one or more ofthe pixels, passing the appearance values for the pixel to an inputlayer of an adaptive resonance theory (ART) network corresponding to thepixel, mapping, by the ART network, the appearance values to one of oneor more clusters of the ART network, and classifying the pixel asdepicting one of scene background and scene foreground, based on themapping of the appearance values to the cluster of the ART network.

Still another embodiment of the invention provides a system. The systemitself may generally include a video input source configured to providea sequence of video frames, each depicting a scene, a processor and amemory containing a program, which, when executed on the processor isconfigured to perform an operation for generating a background model ofa scene depicted in a sequence of video frames captured by a videocamera.

The operation itself may generally include receiving a video frame. Thevideo frame includes one or more appearance values for each of aplurality of pixels; The operation may also include, for one or more ofthe pixels, passing the appearance values for the pixel to an inputlayer of an adaptive resonance theory (ART) network corresponding to thepixel, mapping, by the ART network, the appearance values to one of oneor more clusters of the ART network, and classifying the pixel asdepicting one of scene background and scene foreground, based on themapping of the appearance values to the cluster of the ART network.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features, advantages, andobjects of the present invention are attained and can be understood indetail, a more particular description of the invention, brieflysummarized above, may be had by reference to the embodiments illustratedin the appended drawings.

It is to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIG. 1 illustrates components of a video analysis system, according toone embodiment of the invention.

FIG. 2 further illustrates components of the video analysis system shownin FIG. 1, according to one embodiment of the invention.

FIG. 3 illustrates an example of a background/foreground component ofthe video analysis system shown in FIG. 2, according to one embodimentof the invention.

FIG. 4 illustrates a method for classifying pixels in a frame of videoas depicting scene background or foreground, according to one embodimentof the invention.

FIG. 5 illustrates a method for classifying a pixel as depicting scenebackground or foreground, according to one embodiment of the invention.

FIG. 6 illustrates a graphical representation of clusters in an ARTnetwork used to model complex and dynamic scene backgrounds, accordingto one embodiment of the invention.

FIGS. 7A-7B illustrate an example of a scene with a dynamic background,according to one embodiment of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Embodiments of the invention provide techniques for generating abackground model for a complex and/or dynamic scene over a period ofobservations without supervision. The approaches described herein allowa background model generated by a computer vision engine to adapt torecognize different background states observed in the scene over time.Thus, the computer vision engine may more accurately distinguish betweennovel objects (foreground) present in the scene and elements of scenebackground, particularly for scenes with dynamic or complex backgrounds.

In one embodiment, an array of Adaptive Resonance Theory (ART) networksis used to generate a background model of the scene. For example, thebackground model may include a two-dimensional (2D) array of ARTnetworks, where each pixel is modeled using one of the ART networks inthe 2D array. When the background model is initiated, the 2D array ofART networks observes the image for regular (or periodic) patternsoccurring in the pixel color values. As described in greater detailherein, an ART network may contain multiple clusters, each described bymeans and variances. The means and the variances for the clusters areupdated in each successive video frame. In context of the presentinvention, each cluster in an ART network may represent a distinctbackground state for the corresponding pixel. Additionally, each clustermay be monitored for maturity. When a cluster in the ART network forpixel (x, y) has matured, it is used to classify that pixel as depictingeither foreground or background; namely, if the RGB values for a pixelmap to a mature cluster, then that pixel is presumed to depict scenebackground.

Thus, each ART network in the 2D array models one of the pixels overmultiple frames of video by creating new clusters, modifying, merging,and removing clusters from the network, based on the pixel color valuesfor that pixel observed over time. Classification is applied usingchoice tests and vigilance tests. The choice test measures the lengthbetween two points (learned point of cluster vs. test point) in the RGBspace. The vigilance test measures the angle between two points in theRGB space. The similarity measure used for the vigilance test helpsprevent the background model from classifying weak shadow as foreground.The creation of a new cluster may indicate either a valid change of apixel or a noisy pixel. The modification of an existing clusterreinforces the significance/importance of a cluster. The merging ofmultiple clusters maintains the accuracy, stability, and scalability ofthe background model. The deletion of a cluster removes a weak belief ofa new background/foreground state for the corresponding pixel.

For example, in a scene where a door is generally always open or closed,the door ‘open’ and ‘close’ states could be considered as layer in theproposed background model and therefore be treated as background.Furthermore, noise in the scene may be modeled using multiple clustersin an ART and therefore be treated as background. Moreover, a random cardrove by the scene does not result in a new background state because anyclusters generated for a pixel depicting the car over a small number offrames is unstable and eventually deleted when not reinforced.Consequently, the proposed background model is adaptive to complex anddynamic environments in a manner that does not require any supervision;thus, it is suitable for long-term observation in a video surveillanceapplication.

Once the background model for a scene has matured, the computer visionengine may compare the pixel values for a given frame with thebackground image and identify objects as they appear and move about thescene. Typically, when a region of pixels in the scene (referred to as a“blob” or “patch”) is classified as depicting foreground, the patchitself is identified as a foreground object. Once identified, the objectmay be evaluated by a classifier configured to determine what isdepicted by the foreground object (e.g., a vehicle or a person).Further, the computer vision engine may identify features (e.g.,height/width in pixels, average color values, shape, area, and the like)used to track the object from frame-to-frame. Further still, thecomputer vision engine may derive a variety of information whiletracking the object from frame-to-frame, e.g., position, current (andprojected) trajectory, direction, orientation, velocity, acceleration,size, color, and the like. In one embodiment, the computer visionoutputs this information as a stream of “context events” describing acollection of kinematic information related to each foreground objectdetected in the video frames.

Data output from the computer vision engine may be supplied to themachine-learning engine. In one embodiment, the machine-learning enginemay evaluate the context events to generate “primitive events”describing object behavior. Each primitive event may provide somesemantic meaning to a group of one or more context events. For example,assume a camera records a car entering a scene, and that the car turnsand parks in a parking spot. In such a case, the computer vision enginecould initially recognize the car as a foreground object; classify it asbeing a vehicle, and output kinematic data describing the position,movement, speed, etc., of the car in the context event stream. In turn,a primitive event detector could generate a stream of primitive eventsfrom the context event stream such as “vehicle appears,” vehicle turns,”“vehicle slowing,” and “vehicle stops” (once the kinematic informationabout the car indicated a speed of 0). As events occur, and re-occur,the machine-learning engine may create, encode, store, retrieve, andreinforce patterns representing the events observed to have occurred,e.g., long-term memories representing a higher-level abstraction of acar parking in the scene—generated from the primitive events underlyingthe higher-level abstraction. Further still, patterns representing anevent of interest may result in alerts passed to users of the behavioralrecognition system.

In the following, reference is made to embodiments of the invention.However, it should be understood that the invention is not limited toany specifically described embodiment. Instead, any combination of thefollowing features and elements, whether related to differentembodiments or not, is contemplated to implement and practice theinvention. Furthermore, in various embodiments the invention providesnumerous advantages over the prior art. However, although embodiments ofthe invention may achieve advantages over other possible solutionsand/or over the prior art, whether or not a particular advantage isachieved by a given embodiment is not limiting of the invention. Thus,the following aspects, features, embodiments and advantages are merelyillustrative and are not considered elements or limitations of theappended claims except where explicitly recited in a claim(s). Likewise,reference to “the invention” shall not be construed as a generalizationof any inventive subject matter disclosed herein and shall not beconsidered to be an element or limitation of the appended claims exceptwhere explicitly recited in a claim(s).

One embodiment of the invention is implemented as a program product foruse with a computer system. The program(s) of the program productdefines functions of the embodiments (including the methods describedherein) and can be contained on a variety of computer-readable storagemedia. Examples of computer-readable storage media include (i)non-writable storage media (e.g., read-only memory devices within acomputer such as CD-ROM or DVD-ROM disks readable by an optical mediadrive) on which information is permanently stored; (ii) writable storagemedia (e.g., floppy disks within a diskette drive or hard-disk drive) onwhich alterable information is stored. Such computer-readable storagemedia, when carrying computer-readable instructions that direct thefunctions of the present invention, are embodiments of the presentinvention. Other examples media include communications media throughwhich information is conveyed to a computer, such as through a computeror telephone network, including wireless communications networks.

In general, the routines executed to implement the embodiments of theinvention may be part of an operating system or a specific application,component, program, module, object, or sequence of instructions. Thecomputer program of the present invention is comprised typically of amultitude of instructions that will be translated by the native computerinto a machine-readable format and hence executable instructions. Also,programs are comprised of variables and data structures that eitherreside locally to the program or are found in memory or on storagedevices. In addition, various programs described herein may beidentified based upon the application for which they are implemented ina specific embodiment of the invention. However, it should beappreciated that any particular program nomenclature that follows isused merely for convenience, and thus the invention should not belimited to use solely in any specific application identified and/orimplied by such nomenclature.

FIG. 1 illustrates components of a video analysis andbehavior-recognition system 100, according to one embodiment of thepresent invention. As shown, the behavior-recognition system 100includes a video input source 105, a network 110, a computer system 115,and input and output devices 118 (e.g., a monitor, a keyboard, a mouse,a printer, and the like). The network 110 may transmit video datarecorded by the video input 105 to the computer system 115.Illustratively, the computer system 115 includes a CPU 120, storage 125(e.g., a disk drive, optical disk drive, floppy disk drive, and thelike), and a memory 130 containing both a computer vision engine 135 anda machine-learning engine 140. As described in greater detail below, thecomputer vision engine 135 and the machine-learning engine 140 mayprovide software applications configured to analyze a sequence of videoframes provided by the video input 105.

Network 110 receives video data (e.g., video stream(s), video images, orthe like) from the video input source 105. The video input source 105may be a video camera, a VCR, DVR, DVD, computer, web-cam device, or thelike. For example, the video input source 105 may be a stationary videocamera aimed at a certain area (e.g., a subway station, a parking lot, abuilding entry/exit, etc.), which records the events taking placetherein. Generally, the area visible to the camera is referred to as the“scene.” The video input source 105 may be configured to record thescene as a sequence of individual video frames at a specified frame-rate(e.g., 24 frames per second), where each frame includes a fixed numberof pixels (e.g., 320×240). Each pixel of each frame may specify a colorvalue (e.g., an RGB value) or grayscale value (e.g., a radiance valuebetween 0-255). Further, the video stream may be formatted using knownsuch formats e.g., MPEG2, MJPEG, MPEG4, H.263, H.264, and the like.

As noted above, the computer vision engine 135 may be configured toanalyze this raw information to identify active objects in the videostream, classify the objects, derive a variety of metadata regarding theactions and interactions of such objects, and supply this information toa machine-learning engine 140. And in turn, the machine-learning engine140 may be configured to evaluate, observe, learn and remember detailsregarding events (and types of events) that transpire within the sceneover time.

In one embodiment, the machine-learning engine 140 receives the videoframes and the data generated by the computer vision engine 135. Themachine-learning engine 140 may be configured to analyze the receiveddata, build semantic representations of events depicted in the videoframes, detect patterns, and, ultimately, to learn from these observedpatterns to identify normal and/or abnormal events. Additionally, datadescribing whether a normal/abnormal behavior/event has been determinedand/or what such behavior/event is may be provided to output devices 118to issue alerts, for example, an alert message presented on a GUIinterface screen. In general, the computer vision engine 135 and themachine-learning engine 140 both process video data in real-time.However, time scales for processing information by the computer visionengine 135 and the machine-learning engine 140 may differ. For example,in one embodiment, the computer vision engine 135 processes the receivedvideo data frame-by-frame, while the machine-learning engine 140processes data every N-frames. In other words, while the computer visionengine 135 analyzes each frame in real-time to derive a set ofinformation about what is occurring within a given frame, themachine-learning engine 140 is not constrained by the real-time framerate of the video input.

Note, however, FIG. 1 illustrates merely one possible arrangement of thebehavior-recognition system 100. For example, although the video inputsource 105 is shown connected to the computer system 115 via the network110, the network 110 is not always present or needed (e.g., the videoinput source 105 may be directly connected to the computer system 115).Further, various components and modules of the behavior-recognitionsystem 100 may be implemented in other systems. For example, in oneembodiment, the computer vision engine 135 may be implemented as a partof a video input device (e.g., as a firmware component wired directlyinto a video camera). In such a case, the output of the video camera maybe provided to the machine-learning engine 140 for analysis. Similarly,the output from the computer vision engine 135 and machine-learningengine 140 may be supplied over computer network 110 to other computersystems. For example, the computer vision engine 135 andmachine-learning engine 140 may be installed on a server system andconfigured to process video from multiple input sources (i.e., frommultiple cameras). In such a case, a client application 250 running onanother computer system may request (or receive) the results of overnetwork 110.

FIG. 2 further illustrates components of the computer vision engine 135and the machine-learning engine 140 first illustrated in FIG. 1,according to one embodiment of the present invention. As shown, thecomputer vision engine 135 includes a background/foreground (BG/FG)component 205, a tracker component 210, an estimator/identifiercomponent 215, and a context processor component 220. Collectively, thecomponents 205, 210, 215, and 220 provide a pipeline for processing anincoming sequence of video frames supplied by the video input source 105(indicated by the solid arrows linking the components). Additionally,the output of one component may be provided to multiple stages of thecomponent pipeline (as indicated by the dashed arrows) as well as to themachine-learning engine 140. In one embodiment, the components 205, 210,215, and 220 may each provide a software module configured to providethe functions described herein. Of course one of ordinary skill in theart will recognize that the components 205, 210, 215, and 220 may becombined (or further subdivided) to suit the needs of a particular case.

In one embodiment, the BG/FG component 205 may be configured to separateeach frame of video provided by the video input source 105 into astationary or static part (the scene background) and a collection ofvolatile parts (the scene foreground.) The frame itself may include atwo-dimensional array of pixel values for multiple channels (e.g., RGBchannels for color video or grayscale channel or radiance channel forblack and white video). As noted above, the BG/FG component 205 maymodel the background states for each pixel using a corresponding ARTnetwork. That is, each pixel may be classified as depicting sceneforeground or scene background using an ART network modeling a givenpixel.

Additionally, the BG/FG component 205 may be configured to generate amask used to identify which pixels of the scene are classified asdepicting foreground and, conversely, which pixels are classified asdepicting scene background. The BG/FG component 205 then identifiesregions of the scene that contain a portion of scene foreground(referred to as a foreground “blob” or “patch”) and supplies thisinformation to subsequent stages of the pipeline. In one embodiment, apatch may be evaluated over a number of frames before being forwarded toother components of the computer vision engine 135. For example, theBG/FG component 205 may evaluate features of a patch from frame-to-frameto make an initial determination that the patch depicts a foregroundagent in the scene as opposed to simply a patch of pixels classified asforeground due to camera noise or changes in scene lighting.Additionally, pixels classified as depicting scene background maybe usedto a background image modeling the scene.

The tracker component 210 may receive the foreground patches produced bythe BG/FG component 205 and generate computational models for thepatches. The tracker component 210 may be configured to use thisinformation, and each successive frame of raw-video, to attempt to trackthe motion of the objects depicted by the foreground patches as theymove about the scene.

The estimator/identifier component 215 may receive the output of thetracker component 210 (and the BF/FG component 205) and classify eachtracked object as being one of a known category of objects. For example,in one embodiment, estimator/identifier component 215 may classify atracked object as being a “person,” a “vehicle,” an “unknown,” or an“other.” In this context, the classification of “other” represents anaffirmative assertion that the object is neither a “person” nor a“vehicle.” Additionally, the estimator/identifier component may identifycharacteristics of the tracked object, e.g., for a person, a predictionof gender, an estimation of a pose (e.g., standing or sitting) or anindication of whether the person is carrying an object. In analternative embodiment, the machine learning engine 140 may classifyforeground objects observed by the vision engine 135. For example, themachine-learning engine 140 may include an unsupervised classifierconfigured to observe and distinguish among different agent types (e.g.,between people and vehicles) based on a plurality of micro-features(e.g., size, speed, appearance, etc.).

The context processor component 220 may receive the output from otherstages of the pipeline (i.e., the tracked objects, the background andforeground models, and the results of the estimator/identifier component215). Using this information, the context processor 220 may beconfigured to generate a stream of context events regarding objectstracked (by tracker component 210) and classified (by estimatoridentifier component 215). For example, the context processor component220 may evaluate a foreground object from frame-to-frame and outputcontext events describing that object's height, width (in pixels),position (as a 2D coordinate in the scene), acceleration, velocity,orientation angle, etc.

The computer vision engine 135 may take the outputs of the components205, 210, 215, and 220 describing the motions and actions of the trackedobjects in the scene and supply this information to the machine-learningengine 140. In one embodiment, the primitive event detector 212 may beconfigured to receive the output of the computer vision engine 135(i.e., the video images, the object classifications, and context eventstream) and generate a sequence of primitive events—labeling theobserved actions or behaviors in the video with semantic meaning. Forexample, assume the computer vision engine 135 has identified aforeground object and classified that foreground object as being avehicle and the context processor component 220 estimates the kinematicdata regarding the car's position and velocity. In such a case, thisinformation is supplied to the machine-learning engine 140 and theprimitive event detector 212. In turn, the primitive event detector 212may generate a semantic symbol stream providing a simple linguisticdescription of actions engaged in by the vehicle. For example, asequence of primitive events related to observations of the computervision engine 135 occurring at a parking lot could include formallanguage vectors representing the following: “vehicle appears in scene,”“vehicle moves to a given location,” “vehicle stops moving,” “personappears proximate to vehicle,” “person moves,” person leaves scene”“person appears in scene,” “person moves proximate to vehicle,” “persondisappears,” “vehicle starts moving,” and “vehicle disappears.” Asdescribed in greater detail below, the primitive event stream may besupplied to excite the perceptual associative memory 230.

Illustratively, the machine-learning engine 140 includes a long-termmemory 225, a perceptual memory 230, an episodic memory 235, a workspace240, codelets 245, and a mapper component 211. In one embodiment, theperceptual memory 230, the episodic memory 235, and the long-term memory225 are used to identify patterns of behavior, evaluate events thattranspire in the scene, and encode and store observations. Generally,the perceptual memory 230 receives the output of the computer visionengine 135 (e.g., the context event stream) and a primitive event streamgenerated by primitive event detector 212. The episodic memory 235stores data representing observed events with details related to aparticular episode, e.g., information describing time and space detailsrelated on an event. That is, the episodic memory 235 may encodespecific details of a particular event, i.e., “what and where” somethingoccurred within a scene, such as a particular vehicle (car A) moved to alocation believed to be a parking space (parking space 5) at 9:43 AM.

The long-term memory 225 may store data generalizing events observed inthe scene. To continue with the example of a vehicle parking, thelong-term memory 225 may encode information capturing observations andgeneralizations learned by an analysis of the behavior of objects in thescene such as “vehicles tend to park in a particular place in thescene,” “when parking vehicles tend to move a certain speed,” and “aftera vehicle parks, people tend to appear in the scene proximate to thevehicle,” etc. Thus, the long-term memory 225 stores observations aboutwhat happens within a scene with much of the particular episodic detailsstripped away. In this way, when a new event occurs, memories from theepisodic memory 235 and the long-term memory 225 may be used to relateand understand a current event, i.e., the new event may be compared withpast experience, leading to both reinforcement, decay, and adjustmentsto the information stored in the long-term memory 225, over time. In aparticular embodiment, the long-term memory 225 may be implemented as abinary ART network and a sparse-distributed memory data structure.

The mapper component 211 may receive the context event stream and theprimitive event stream and parse information to multiple ART networks togenerate statistical models of what occurs in the scene for differentgroups of context events and primitive events.

Generally, the workspace 240 provides a computational engine for themachine-learning engine 140. For example, the workspace 240 may beconfigured to copy information from the perceptual memory 230, retrieverelevant memories from the episodic memory 235 and the long-term memory225, select and invoke the execution of one of codelets 245. In oneembodiment, each codelet 245 is a software program configured toevaluate different sequences of events and to determine how one sequencemay follow (or otherwise relate to) another (e.g., a finite statemachine). More generally, the codelet may provide a software moduleconfigured to detect interesting patterns from the streams of data fedto the machine-learning engine. In turn, the codelet 245 may create,retrieve, reinforce, or modify memories in the episodic memory 235 andthe long-term memory 225. By repeatedly scheduling codelets 245 forexecution, copying memories and percepts to/from the workspace 240, themachine-learning engine 140 performs a cognitive cycle used to observe,and learn, about patterns of behavior that occur within the scene.

FIG. 3 illustrates an example of a background/foreground (BG/FG)component 205 of the computer vision engine 135 system shown in FIG. 2,according to one embodiment of the invention. As shown, the BG/FGcomponent 205 includes a current background image 310, an ART networkarray 315, a background/foreground classifier 320 and abackground/foreground segmentation tool 325.

The current background image 310 generally provides an RGB (orgrayscale) value for each pixel in a scene being observed by thecomputer vision engine 135. The RGB values in the background image 310specify a color value expected when the background of the scene isvisible to the camera. That is, the color values observed in a frame ofvideo when not occluded by a foreground object. The BG/FG classifier 320may update the color values of pixels in the background image 310dynamically while the computer vision engine observes a sequence ofvideo frames.

In one embodiment, the BG/FG component 205 is configured to receive acurrent frame of video 302 from an input source (e.g., a video camera).And in response, the BG/FG component 205 classifies each pixel in theframe as depicting scene background or scene foreground. For example,the RGB values for a given pixel may be passed to an input layer of acorresponding ART network in the ART network array 315. Each ART networkin the array 315 provides a specialized neural network configured tocreate clusters from a group of inputs (e.g., RGB pixel color valuesreceived from frame-to-frame). Each cluster in an ART network may becharacterized by a mean and a variance from a prototype inputrepresenting that cluster (i.e., from an RGB value representing thatcluster). The prototype is generated first, as a copy of the inputvector used to create a new cluster (i.e., from the first set of RGBvalues used to create the new cluster). Subsequently, as new input RGBvalues are mapped to an existing cluster, the prototype RGB values (andthe mean and variance for that cluster) may be updated using the inputRGB values.

Additionally, the BG/FG component 205 may track how many input vectors(e.g., RGB pixel color values) map to a given cluster. Once a clusterhas “matured” the BG/FG classifier 320 classifies a pixel mapping tothat cluster as depicting scene background. In one embodiment, a clusteris “matured” once a minimum number of input RBG values have mapped tothat cluster. Conversely, the BG/FG component 205 may classify pixelsmapping to a cluster that has not matured (or pixels that result in anew cluster) as depicting an element of scene foreground.

For example, in context of the present invention, an ART network inarray 315 receives a vector storing the RGB color values of a pixel inthe video frame 202. The particular ART network receives the RGB pixelcolor values for that same pixel from frame-to-frame. In response, theART network may either update an existing cluster or create a newcluster, as determined using a choice and a vigilance test for the ARTnetwork. The choice and vigilance tests are used to evaluate the RGBinput values passed to the ART network. The choice test may be used torank the existing clusters, relative to the vector input RGB values. Inone embodiment, the choice test may compute a Euclidian distance in RGBspace between each cluster and the input RGB value, and the resultingdistances can be ranked by magnitude (where smaller distances are rankedhigher than greater distances). Once ranked, the vigilance testevaluates the existing clusters to determine whether to map the RGBinput to one of the ranked clusters. In one embodiment, the vigilancetest may compute a cosine angle between the two points (relative to a<0, 0, 0> origin of RGB space).

If no cluster is found to update using the RGB values supplied to theinput layer (evaluated using the ranked clusters) then a new cluster iscreated. Subsequent input vectors that most closely resemble the newcluster (also as determined using the choice and vigilance test) arethen used to update that cluster. As is known, the vigilance parameterhas considerable influence on an ART network; higher vigilance producesmany, fine-grained clusters, where a while lower vigilance results inmore general clusters. In one embodiment, the ART networks in array 315may provide dynamic cluster sizes. For example, each cluster may begiven an initial shape and size, such as a radius of 5-10. Each newinput to a given ART network in array 315 is then used to update thesize of a cluster for each dimension of input data (or create a newcluster).

Additionally, in one embodiment, the ART networks in array 315 may alsobe configured to provide for cluster decay. For example, each ARTnetwork in array 315 may be configured remove a cluster that is notreinforced. In such a case, if a new cluster is created, but no newinputs (e.g., RGB values) map to that cluster for a specified period,then that ART network may simply remove the cluster. Doing so avoidstransient elements (namely foreground objects which occlude thebackground) from being misclassified as scene background.

As clusters emerge in the ART networks in array 315, thebackground/foreground (BG/FG) classifier 320 may evaluate the ARTnetworks to classify each pixel in the input video frame as depictingscene foreground or scene background. Additionally, the BG/FG classifier320 may be configured to update the background image 310 using the RGBvalues of pixels classified as depicting scene background. For example,in one embodiment, the current background image may be updated using theinput frame as follows. First, each pixel appearance value (e.g., RGBvalues) is mapped to the ART network in array 315 corresponding to thatpixel. If a given pixel maps to a cluster determined to model abackground state, then that pixel is assigned a color value based onthat cluster. Namely, each cluster has a mean which may be used toderive a set of RGB color values. In particular, the RGB values thatwould map directly to the mean value in the cluster.

For pixels in frame 202 with appearance values that do not map to acluster classified as background, the mean for the closest cluster(determined using a Euclidian distance measure) may be used to select anRGB values. Alternatively, as the background elements in the scene mayhave been occluded by a foreground agent, the RGB values in the currentbackground image 310 may remain unchanged. For a scene with multiplebackground states, this latter approach leaves the background image inthe last observed state. For example, consider a person standing infront of a closed elevator door. In such a case, the last observed pixelRGB values may correspond to the color of the closed elevator door. Whenthe person (a foreground object) occludes the door (e.g., while waitingfor the elevator doors to open). the occluded pixels retain the lastobservation (state) while other pixels in the frame mapping tobackground clusters in the art network are updated.

Once each pixel in the input frame is classified, the BG/FG segmentationtool 325 may be configured to identify contiguous regions of pixelsclassified as foreground. Such regions identify a foreground patchpassed to other elements of the computer vision engine 135. As noted,the BG/FG segmentation tool may evaluate a patch over a number of framesbefore forwarding a patch to other elements of the computer visionengine 135, e.g., to ensure that a given foreground patch is not theresult of camera noise or changes in scene lighting. Additionally, thecurrent background image 310 may be provided to other components of thecomputer vision engine 135 or machine-learning 140, after being updatedwith each successive frame.

FIG. 4 illustrates a method 400 for classifying pixels in a frame ofvideo as depicting scene background or foreground, according to oneembodiment of the invention. As shown, the method 400 begins at step 405where the BG/FG component receives a frame of video. As noted above,each frame may provide a 2D array of pixel appearance values, such as anRGB color value or grayscale radiance value. A loop begins at step 410where the appearance values for each pixel are evaluated. First, at step415, RGB values for one of the pixels in the input frame are passed tothe input layer of an ART network modeling the background state(s) ofthat pixel. At step 420, after the ART network has mapped the input RGBvalues to a cluster (or generated a new cluster) the pixel is classifiedas depicting scene background or foreground.

Following the loop of step 410, at step 425, the BG/FG component 205updates the background model using pixels classified as depicting scenebackground. And at step 430, foreground patches are identified andforwarded to other components of the computer vision engine and./ormachine-learning engine, e.g., the tracker component.

FIG. 5 illustrates a method 500 for classifying a pixel as depictingscene background or foreground, according to one embodiment of theinvention. The method 500 generally corresponds to steps 415 and 420 ofthe method illustrated in FIG. 4. That is, the method 500 illustratesone pixel from a frame of video being evaluated ad classified asdepicting scene background of scene foreground.

As shown, the method 500 beings at step 505 where an input layer of anART network modeling the background state of a pixel in a scene receivesappearance values for that pixel. In response, at step 510, the ARTnetwork compares the RGB input values to clusters in the ART networkusing the choice and vigilance tests.

At step 515, the ART network determines whether the input RGB values mapto an existing cluster based on the choice and vigilance tests. If not,at step 520, the ART network generates a new cluster using the RGB inputvalues as the prototype for the new cluster. And at step 525, the ARTnetwork may initialize a count for the new cluster. In one embodiment,the count is used to monitor the maturity of the new cluster. Forexample, a parameter may specify how many input RGB values should map toa cluster before the cluster is considered to model a background statefor the scene. The actual value may be tailored to suit the needs of anindividual case, e.g., based on the complexity of the scene beingmodeled as well as the frame rate at which input frames are supplied tothe ART network. Note, such a frame rate may be different from the framerate of a camera observing the scene. At step 530 the pixel isclassified as depicting scene foreground.

Returning to step 515, if the input RGB values do map to an existingcluster (step 535), then that cluster is updated towards the inputvalues. Additionally, the ART network may merge two clusters if theupdate results in two clusters that overlap by a specified amount (e.g.,more than 50% of area is shared between two clusters). At step 540, theART network updates the count of inputs mapped to the selected cluster.As noted above, the count may be used to monitor the maturity of acluster in the ART network. Accordingly, at step 545, the ART networkdetermines whether the cluster has (or is) mature (and thereforerepresents a background state for the pixel). If so, at step 550, thepixel is classified as depicting scene background, and the RGB values ofthe pixel in the input data may be used to update the corresponding RGBvalues in the background image. Otherwise, at step 555, the pixel isclassified as depicting scene foreground. At step 560, clusters may beremoved from the ART network. For example, in one embodiment, the BG/FGcomponent may provide a tunable parameter specifying how frequently acluster should be reinforced to avoid being removed from an ART network.The frequency may be specified relative to the frame rate at whichframes are evaluated by the BG/FG component, the frame rate of thevideo, an elapsed time, or otherwise.

FIG. 6 illustrates a graphical representation of clusters in an ARTnetwork 605 used to model complex and dynamic scene backgrounds,according to one embodiment of the invention. In this example, assumethe inputs represent the RGB color values for a single pixel overmultiple frames of video. As shown, at time 1, a set of inputs maps toan initial cluster 610 in ART network 605. Assume for this example thatthe pixel does, in fact, depict scene background and that after beingreinforced over a number of frames, the cluster 610 matures and isconsidered to represent a background state for this pixel within thescene.

Assume at time 2, the RGB color values for the pixel in a subsequentframe is supplied to ART network 605. Illustratively, the inputs map tothe cluster 610, within the limits defined by the variance and choicevariable specified for this ART network. Accordingly, the pixel isclassified as depicting background in the frame received at time 2 andthe cluster 610 is updated using the set of inputs supplied at time 2.This results in a cluster 615 at a slightly different position. Assumeat time 3, however, a frame is received with pixel color values that donot map to the cluster 610. And instead, the ART network 605 creates anew cluster 620. This could result from a foreground object occludingthe background or a new background state being presented to the ARTnetwork 605. In either case, the pixel corresponding to the RGB valuesreceived at time 3 is classified as depicting scene foreground. Insubsequent frames, if cluster 620 is reinforced with additional inputvalues, then the BG/FG component may eventually recognize cluster 620 asa second background state for the pixel being modeled by ART network605.

At time 4, assume that number of other frames has been received and thatcluster 625 has emerged in the ART network. Further assume cluster 625has matured as a background state for the pixel modeled by the ARTnetwork 605. As shown, however, cluster 625 substantially overlaps withcluster 615. In such a case, as additional pixel color values suppliedto ART network 605, clusters 615 and 625 may drift closer together—tothe point that they overlap by an amount greater than a specifiedpercentage of their areas. When two clusters overlap by an amount thatexceeds such a percentage, the ART network may merge the overlappingclusters. Doing so may help keep the number of distinct clusters managedby the ART network manageable. The results of the merger are shown attime 5, where cluster 630 has an elliptical shape derived form clusters615 and 625. For example, as noted above, each cluster may have a meanand a variance in each of the X and Y directions (corresponding, e.g.,to the R, G, and B pixel appearance values). In such a case the mean andvariance from cluster 615 and cluster 625 (at time 4) may be used tocreate a merged cluster 630 shown at time 5.

At time 6, assume that a pixel with RGB values is received that maps tocluster 620 and that cluster 620 has matured. In response, therefore,the ART network classifies the pixel as depicting scene background. Thismay occur because the particular pixel depicts a portion of the scenethat has multiple background states (e.g., an elevator door that can beopen or closed (modeled by clusters 60 and 630). Alternatively, however,the background may have changed. For example, someone could have enteredthe scene and left a physical object behind. In such a case, cluster 620could represent the current background state cluster 630 wouldeventually decay out of the ART network 605, as it is no longer beingreinforced. Both scenarios are illustrated in FIGS. 7A-7B.

Specifically, FIGS. 7A-7B illustrate an example of a scene with adynamic background, according to one embodiment of the invention. Inthis example, FIG. 7A shows a video frame 700 captured using a cameratrained on a bank of two elevators, including elevator 705. Assume forthis example that the camera observes the bank of elevators without anyforeground elements occluding this scene for an extended period and thatan ART network models the RGB pixel color for each pixel in this scene.Thus, a cluster emerges in each ART network representing the observedbackground state depicted in FIG. 7A. In this example, the doors 702 ofelevator 705 are shown closed. Accordingly, the ART networks modelingthe pixels depicting elevator doors 702 would have a cluster modelingthe color of the elevator doors in this closed state. FIG. 7Billustrates a frame 720 of the same scene after elements of thebackground have changed. Specifically, elevator 705 is shown after thedoors have opened, rendering an interior 701 of the elevator visible tothe camera. However, the interior 710 of the elevator is not sceneforeground. Accordingly, over time, the ART network modeling the pixels(which previously depicted the elevator doors) would have a clusteremerge that models the pixel colors of the interior 710 of the elevator.That is, the ART networks modeling these pixels would have a secondcluster emerge modeling the distinct background state of the elevatordoors being open.

Similarly, FIG. 7B shows a plant 715 having been placed between theelevators. Assume that a person (not shown) appeared in the scene andplaced the plant at the final location shown in FIG. 7B. In such a case,when initially introduced into the scene, the plant 715 would beobserved and tracked as a foreground object. However, once placed in thefinal location shown in FIG. 7B, the pixels color values depicting theplant 715 would become relatively fixed (depending on the noise in thecamera). Further, the color values for each of these pixels would beginmapping to an immature cluster. However, such a cluster would bereinforced until the pixels depicting the plant mature to the pointwhere the plant 715 becomes part of the background of the scene. Thatis, a new background state has been created which includes the plant715. Further, whatever former clusters existing in the ART network forthe pixels now depicting the plant 715 would now decay out of thebackground model as they are no longer reinforced. That is, the clustersmodeling the color of the wall behind the plant are no longer reinforcedand eventually decay out of the background model.

Advantageously, as described, embodiments of the invention providetechniques for modeling a background for a complex and/or dynamic sceneover a period of observations without supervision. Abackground/foreground component of a computer vision engine may beconfigured to model a scene using an array of ART networks. The ARTnetworks learn the regularity and periodicity of the scene by observingthe scene over a period of time. The ART networks allow the computervision engine to model complex and dynamic scene backgrounds in video.

While the foregoing is directed to embodiments of the present invention,other and further embodiments of the invention may be devised withoutdeparting from the basic scope thereof, and the scope thereof isdetermined by the claims that follow.

What is claimed is:
 1. A computer-implemented method for generating abackground model of a scene depicted in a sequence of video framescaptured by a video camera, the method comprising: receiving a videoframe, wherein the video frame includes one or more appearance valuesfor each of a plurality of pixels; for one or more of the pixels:passing the appearance values for the pixel to an input layer of anadaptive resonance theory (ART) network corresponding to the pixel;mapping, by the ART network, the appearance values to one of one or moreclusters of the ART network; classifying the pixel as depicting one ofscene background and scene foreground, based on the mapping of theappearance values to the cluster of the ART network.
 2. The method ofclaim 1, wherein the pixel is classified as depicting scene backgroundin response to determining that the cluster to which the appearancevalues are mapped to is a matured cluster in the ART network.
 3. Themethod of claim 1, wherein the appearance values for the pixel comprisea set of RGB color values.
 4. The method of claim 1, wherein mapping theappearance values to the cluster of the ART network comprises generatinga new cluster in the ART network.
 5. The method of claim 1, furthercomprising, decaying a first cluster out of the ART network in responseto determining the first cluster has not been reinforced by the mappingof the appearance values to the first cluster.
 6. The method of claim 1,further comprising merging two or more clusters in the ART network. 7.The method of claim 1, wherein mapping the appearance values to thecluster of the ART network comprises evaluating the appearance valuesaccording to a vigilance test and a choice test.
 8. The method of claim7, wherein the appearance values for the pixel comprise a set of RGBcolor values input to the ART network and the choice test comprisesdetermining a Euclidean distance between the RGB color values input tothe ART network and a prototype set of RGB values associated with thecluster.
 9. The method of claim 7, wherein the appearance values for thepixel comprise a set of RGB color values input to the ART network andthe vigilance test comprises determining a cosine angle and a prototypeset of RGB values associated with the cluster, relative to an origin ofthe RGB space.
 10. A computer-readable storage medium containing aprogram, which when executed on a processor, performs an operation forgenerating a background model of a scene depicted in a sequence of videoframes captured by a video camera, the operation comprising: receiving avideo frame, wherein the video frame includes one or more appearancevalues for each of a plurality of pixels; for one or more of the pixels:passing the appearance values for the pixel to an input layer of anadaptive resonance theory (ART) network corresponding to the pixel;mapping, by the ART network, the appearance values to one of one or moreclusters of the ART network; classifying the pixel as depicting one ofscene background and scene foreground, based on the mapping of theappearance values to the cluster of the ART network.
 11. Thecomputer-readable storage medium of claim 10, wherein the pixel isclassified as depicting scene background in response to determining thatthe cluster to which the appearance values are mapped to is a maturedcluster in the ART network.
 12. The computer-readable storage medium ofclaim 10, wherein mapping the appearance values to the cluster of theART network comprises generating a new cluster in the ART network. 13.The computer-readable storage medium of claim 10, wherein the operationfurther comprises, decaying a first cluster out of the ART network inresponse to determining the first cluster has not been reinforced by themapping of the appearance values to the first cluster.
 14. Thecomputer-readable storage medium of claim 10, wherein the operationfurther comprises merging two or more clusters in the ART network. 15.The computer-readable storage medium of claim 10, wherein mapping theappearance values to the cluster of the ART network comprises evaluatingthe appearance values according to a vigilance test and a choice test.16. The computer-readable storage medium of claim 15, wherein theappearance values for the pixel comprise a set of RGB color values inputto the ART network and the choice test comprises determining a Euclideandistance between the RGB color values input to the ART network and aprototype set of RGB values associated with the cluster.
 17. Thecomputer-readable storage medium of claim 15, wherein the appearancevalues for the pixel comprise a set of RGB color values input to the ARTnetwork and the vigilance test comprises determining a cosine angle anda prototype set of RGB values associated with the cluster, relative toan origin of the RGB space.
 18. A system, comprising: a video inputsource configured to provide a sequence of video frames, each depictinga scene; a processor; and a memory containing a program, which, whenexecuted on the processor is configured to perform an operation forgenerating a background model of a scene depicted in a sequence of videoframes captured by a video camera, the operation comprising: receiving avideo frame, wherein the video frame includes one or more appearancevalues for each of a plurality of pixels; for one or more of the pixels:passing the appearance values for the pixel to an input layer of anadaptive resonance theory (ART) network corresponding to the pixel;mapping, by the ART network, the appearance values to one of one or moreclusters of the ART network; classifying the pixel as depicting one ofscene background and scene foreground, based on the mapping of theappearance values to the cluster of the ART network.
 19. The system ofclaim 18, wherein the pixel is classified as depicting scene backgroundin response to determining that the cluster to which the appearancevalues are mapped to is a matured cluster in the ART network.
 20. Thesystem of claim 18, wherein mapping the appearance values to the clusterof the ART network comprises generating a new cluster in the ARTnetwork.
 21. The system of claim 18, wherein the operation furthercomprises, decaying a first cluster out of the ART network in responseto determining the first cluster has not been reinforced by the mappingof the appearance values to the first cluster.
 22. The system of claim18, wherein the operation further comprises merging two or more clustersin the ART network.
 23. The system of claim 18, wherein mapping theappearance values to the cluster of the ART network comprises evaluatingthe appearance values according to a vigilance test and a choice test.24. The system of claim 23, wherein the appearance values for the pixelcomprise a set of RGB color values input to the ART network and thechoice test comprises determining a Euclidean distance between the RGBcolor values input to the ART network and a prototype set of RGB valuesassociated with the cluster.
 25. The system of claim 23, wherein theappearance values for the pixel comprise a set of RGB color values inputto the ART network and the vigilance test comprises determining a cosineangle and a prototype set of RGB values associated with the cluster,relative to an origin of the RGB space.